vcProductNeed

A product need is an abstract object that informs Visual Components about a process that is ready for a product. vcProductNeed is the owner of a product need and has full control over the need.

See in: Overview

Module: vcProcessModel

Parent: vcObject

Children -

Referenced by: vcProductMatcher.PendingNeeds, vcProductNeedFeedMatch.MatchedNeed

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
IsCancellableBooleanRGets if the need can be cancelled. Internal needs cannot be cancelled.
NeedMatchTypevcProductMatchModeRGets the type and requirements for matching the need with a feed.
ProductFiltervcProductFilterRGets the filter defining the products that the process accepts.
RegistrationSimTimeRealRGets the time in the simulation when the need has been added to the product matcher.
TargetNodevcTransportNodeRGets the target location of the product. This is usually the process that creates the need.
See more
For a need and feed to be matched, a valid transportation solution must exist between the feed's SourceNode and the need's TargetNode.
TargetProcessGroupIdStringRGets the name of the target process.
See more
To be matched with a feed, TargetProcessGroupId needs to have the same value as the feed's NextProcessGroupId property.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
newvcProductNeedvcProductFilter filter,
vcTransportNode node,
String id
Creates a new vcProductNeed object and returns the new need.
See more
Parameters:
filter (vcProductFilter): The filter defining which products can be matched to this need.
node (vcTransportNode): The target node of the need.
targetProcessGroupId (str): The name of the target process group.

Returns:
vcProductNeed: The created need.
setOnMatchedNoneCallable OR None functionSets the callback function that is called when the need is matched with a feed.
See more
Parameters:
function (callable): The function to call when the event is triggered.
tryCancelBooleanNoneCancels a match and removes the need from the product matcher. A match cannot be cancelled after the match has been finalized.
See more
Returns:
bool: True if the match was cancelled or the need was not found in the product matcher. False otherwise.

Exceptions:
ValueError: When the need is not cancellable due to being handled internally.